﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WebSimplicity.Data.Helpers;
using System.Web.Security;

namespace WebSimplicity.Data.Blog
{
    public static class Categories
    {
        static Website web = new Website().Current();
        static MembershipUser user = Membership.GetUser();
        public static IEnumerable<ws_Blog_Catgegories> GetCategories()
        {
            Entities db = new Entities(Config.GetConnection("Blog.Data"));
            List<ws_Blog_Catgegories> cats = db.ws_Blog_Catgegories.Where(i => i.WebsiteId == web.WebsiteId).ToList();
            cats.Insert(0, new ws_Blog_Catgegories { CategoryGuid = new Guid() });
            return cats;
        }
    }
}
